package flp.solvers.ant;

import flp.solvers.*;

/** 
 * Klasa zawiera ustawienia dla algorytmu mrowkowego.
 * 
 * @author Lukasz
 */

public class AntSettings implements ISettings {
    
    /**Zawiera ilosc mrowek.*/
    private int antNoumber;  
    
    /**Wspolczynnik parowania [0:1].*/
    private double evaporationRatio;
    
    /**Maksymalna ilosc iteracji dla algorytmu.*/
    private int maxIterations;      
    
    /**Ilosc iteracjie bez zmian layoutu po ktorej nalezy zakonczyc algorytm.*/
    private int iterationsWithNoChange;
    
    /**
     * Konstruktor klasy AntSettings.
     * 
     * @param antNoumber Ilosc mrowek.
     * @param evaporationRatio Wspolczynnik parowania.
     * @param maxIterations Maksymalna ilosc iteracji dla algorytmu.
     * @param iterationsWithNoChange Ilosc iteracji bez zmian layoutu po ilu nalezy zakonczyc algorytm.
     */
    public AntSettings(int antNoumber,double evaporationRatio,int maxIterations,int iterationsWithNoChange){
          this.antNoumber=antNoumber;
          this.evaporationRatio=evaporationRatio;
          this.maxIterations=maxIterations;
          this.iterationsWithNoChange=iterationsWithNoChange;
    }
    
    /**
     * Konstruktor domyslny klasy AntSettings
     *  wartosci domyslne nalezy wyznaczyc empirycznie!
     */
    public AntSettings(){
          this.antNoumber=200;             
          this.evaporationRatio=0.2;
          this.maxIterations=400;
          this.iterationsWithNoChange=50;
    }
    
    public int getAntNumber(){
        return antNoumber;
    }

    public void setAntNoumber(int antNoumber){
        this.antNoumber=antNoumber;
    }
    
    public double getEvaporationRatio(){
        return evaporationRatio;
    }

    public void setEvaporationRatio(double evaporationRatio){
        this.evaporationRatio=evaporationRatio;
    }
    
    public int getMaxIterations(){
        return maxIterations;
    }
    public void setMaxIterations(int maxIterations){
        this.maxIterations=maxIterations;
    }
    
    public int getIterationsWithNoChange(){
        return iterationsWithNoChange;
    }

    public void setiterationsWithNoChange(int iterationsWithNoChange){
        this.iterationsWithNoChange=iterationsWithNoChange;
    }
    
}
